; Music of Batman - The Caped Crusader (1988) (Ocean Software)
; Ripped by Megachur the 27/03/2009

	write "BATM-TCC.BIN"

music_date_rip	equ &1b39
music_adr	equ &9d0d
first_theme	equ 2
last_theme	equ 39	; 2 -> 39

	read "music_header_v1_0.asm"

.l9d14 equ $ + 7
.l9d12 equ $ + 5
.l9d11 equ $ + 4
.l9d10 equ $ + 3
.l9d0e equ $ + 1
.l9d0d
	db #00,#01,#00,#00,#00,#00,#00,#00
.l9d1c equ $ + 7
.l9d1a equ $ + 5
.l9d16 equ $ + 1
	db #00,#01,#00,#14,#00,#fe,#05,#02
.l9d24 equ $ + 7
.l9d23 equ $ + 6
.l9d21 equ $ + 4
.l9d20 equ $ + 3
	db #00,#01,#00,#10,#00,#10,#0f,#01
.l9d2a equ $ + 5
.l9d29 equ $ + 4
.l9d26 equ $ + 1
	db #01,#00,#01,#00,#00,#00,#00,#00
.l9d33 equ $ + 6
	db #00,#00,#01,#00,#00,#00,#00,#08
.l9d3c equ $ + 7
.l9d3a equ $ + 5
	db #02,#00,#0a,#00,#70,#00,#20,#0f
.l9d43 equ $ + 6
.l9d42 equ $ + 5
.l9d3e equ $ + 1
	db #09,#0a,#00,#01,#00,#00,#00,#00
.l9d4c equ $ + 7
	db #00,#00,#00,#04,#00,#30,#00,#00
.l9d53 equ $ + 6
	db #04,#02,#00,#00,#00,#70,#00,#20
.l9d59 equ $ + 4
.l9d55
	db #0f,#01,#02,#00,#00
	ld c,a
.l9d5c equ $ + 1
	ld a,#00
	dec a
	ret nz
	xor a
	ld (la9ac),a
	ld a,c
	ld (l9d11),a
	ret
;
.init_music
;
	ld c,a
	ld a,(l9d5c)
	or a
	ret nz
	ld a,c
	ld (l9d0d),a
	ret
;
; call before init !
;
	call la96a ;call #9034
	xor a
	ld (l9d5c),a
	ld a,#02
	ld (l9d0d),a
	ret
;
.play_music
;
	call l9da3
	xor a
	call l9d94
	ld a,#19
	call l9d94
	ld a,#32
	call l9d94
	jp laafb
.l9d94
	ld (la5fd),a
	call la6e2
	call la67c
	call la6a2
	jp la62e
.l9da3
	ld a,(l9d0d)
	or a
	jr z,l9db6
	ld (l9d59),a
	xor a
	ld (l9d0d),a
	ld (la5f8),a
	jp la971
.l9db6
	ld a,(l9d59)
	or a
	jp z,l9dd2
	ld (la9ac),a
	xor a
	ld (la99a),a
	ld (la99b),a
	ld (la99d),a
	ld (l9d59),a
	ld a,#38
	ld (lab36),a
.l9dd2
	ld a,(la9ac)
	add a
	ret z
	ld l,a
	ld h,#00
	ld de,l9de3
	add hl,de
	ld e,(hl)
	inc hl
	ld d,(hl)
	ex de,hl
	jp (hl)
.l9de3
	dw la998,l9e59,l9e63,l9e6c
	dw l9e6c,l9e8c,l9e6c,l9eac
	dw l9ecc,l9eec,l9efa,l9f03
	dw l9f03,l9f13,l9f1c,l9f49
	dw l9f57,l9f60,l9f82,l9f8b
	dw l9fb0,l9fc4,la0b8,l9fe9
	dw la00d,la03d,la01d,l9fe9
	dw la00d,la04d,la01d,la0b8
	dw la07f,la093,la0b8,la076
	dw la093,la0b8,la0cd,la0cd
.l9e33
	db #00,#01,#02,#30,#30,#30,#30,#30
	db #30,#30,#0a,#40,#80,#00,#40,#00
	db #00,#18,#00,#40,#80,#20,#20,#40
	db #40,#40,#40,#40,#40,#80,#20,#20
	db #80,#20,#20,#80,#20,#20
.l9e59
	xor a
	ld (l9d0d),a
	ld (l9d59),a
	jp la971
.l9e63
	ld a,#00
	ld b,#08
	ld c,#18
	jp la76a
.l9e6c
	ld e,#05
	call la999
	ld e,#18
	ld hl,la1db
	call la5d0
	ld e,#0c
	ld hl,la23b
	call la5e6
	ld e,#00
	ld hl,la20b
	call la5ea
	jp la9c0
.l9e8c
	ld e,#05
	call la999
	ld e,#1d
	ld hl,la1db
	call la5d0
	ld e,#11
	ld hl,la23b
	call la5e6
	ld e,#05
	ld hl,la20b
	call la5ea
	jp la9c0
.l9eac
	ld e,#05
	call la999
	ld e,#18
	ld hl,la14b
	call la5d0
	ld e,#0c
	ld hl,la1ab
	call la5e6
	ld e,#0c
	ld hl,la17b
	call la5ea
	jp la9c0
.l9ecc
	ld e,#05
	call la999
	ld e,#18
	ld hl,la1db
	call la5d0
	ld e,#11
	ld hl,la11b
	call la5e6
	ld e,#0c
	ld hl,la20b
	call la5ea
	jp la9c0
.l9eec
	ld a,(la5f8)
	xor #01
	ld (la5f8),a
	ld a,#03
	ld (l9d59),a
	ret
.l9efa
	ld a,#00
	ld b,#08
	ld c,#10
	jp la76a
.l9f03
	ld e,#08
	call la999
	ld e,#0c
	ld hl,la26b
	call la5e6
	jp l9f29
.l9f13
	ld a,#00
	ld b,#00
	ld c,#10
	jp la76a
.l9f1c
	ld e,#08
	call la999
	ld e,#18
	ld hl,la2ab
	call la5e6
.l9f29
	ld a,c
	and #3f
	ld c,a
	ld e,#00
	ld hl,la30b
	call la5ea
	ld a,c
	and #1f
	ld c,a
	ld e,#18
	ld hl,la2eb
	call la5d0
	ld e,#18
	call la5ac
	jp la9c0
.l9f49
	ld a,(la5f8)
	xor #03
	ld (la5f8),a
	ld a,#0a
	ld (l9d59),a
	ret
.l9f57
	ld a,#10
	ld b,#08
	ld c,#10
	jp la76a
.l9f60
	ld e,#08
	call la999
	ld e,#0c
	ld hl,la0eb
	call la5e6
	ld e,#18
	ld hl,la0d3
	call la5e3
	ld e,#00
	ld hl,la103
	call la5ea
	ld e,#01
	jp la9cb
.l9f82
	ld a,#18
	ld b,#08
	ld c,#18
	jp la76a
.l9f8b
	ld e,#08
	call la999
	ld e,#18
	ld hl,la52c
	call la5e6
.l9f98
	ld e,#18
	ld hl,la4ac
	call la5d0
	ld e,#00
	ld hl,la4ec
	call la5ea
	ld e,#00
	call la5ac
	jp la9c0
.l9fb0
	ld e,#08
	call la999
	ld e,#24
	ld hl,la52c
	call la5e6
	ld a,c
	and #3f
	ld c,a
	jp l9f98
.l9fc4
	ld e,#08
	call la999
	ld e,#24
	ld hl,la48b
	call la5e6
	ld e,#11
	ld hl,la4ac
	call la5d0
	ld e,#05
	ld hl,la4ec
	call la5ea
	ld e,#00
	call la5ac
	jp la9c0
.l9fe9
	ld e,#08
	call la999
	ld e,#18
	ld hl,la52c
	call la5e6
.l9ff6
	ld a,c
	and #3f
	ld c,a
	ld e,#18
	ld hl,la38b
	call la5d0
	ld e,#00
	ld hl,la4ec
	call la5ea
	jp la9c0
.la00d
	ld e,#08
	call la999
	ld e,#24
	ld hl,la52c
	call la5e6
	jp l9ff6
.la01d
	ld e,#08
	call la999
	ld e,#18
	ld hl,la44b
	call la5e6
	ld e,#1d
	ld hl,la38b
	call la5d0
	ld e,#05
	ld hl,la4ec
	call la5ea
	jp la9c0
.la03d
	ld e,#08
	call la999
	ld e,#18
	ld hl,la40b
	call la5e6
	jp l9ff6
.la04d
	ld a,#01
	ld (la5f8),a
	ld e,#08
	call la999
	ld e,#18
	ld hl,la3cb
	call la5e6
	ld a,c
	and #3f
	ld c,a
	ld e,#18
	ld hl,la38b
	call la5d0
	ld e,#00
	ld hl,la4ec
	call la5ea
	jp la9c0
.la076
	xor a
	ld (la5f8),a
	ld a,#01
	ld (l9d3e),a
.la07f
	ld e,#08
	call la999
	ld a,c
	and #3f
	ld c,a
	ld e,#18
	ld hl,la34b
	call la5e6
	jp l9f98
.la093
	ld e,#08
	call la999
	ld e,#1d
	ld hl,la34b
	call la5e6
	ld e,#1d
	ld hl,la4ac
	call la5d0
	ld e,#05
	ld hl,la4ec
	call la5ea
	ld e,#00
	call la5ac
	jp la9c0
.la0b8
	ld e,#08
	call la999
	ld a,c
	and a
	jp nz,l9f98
	ld e,#24
	ld hl,la4ab
	call la5e6
	jp l9f98
.la0cd
	ld a,#12
	ld (l9d59),a
	ret
.la0d3
	db #03,#03,#02,#02,#01,#01,#02,#02
	db #03,#03,#02,#02,#01,#01,#02,#02
	db #08,#00,#00,#08,#00,#00,#00,#00
.la0eb
	db #08,#08,#08,#08,#08,#08,#08,#08
	db #08,#08,#08,#08,#08,#08,#08,#08
	db #08,#00,#00,#08,#00,#00,#00,#00
.la103
	db #08,#08,#07,#07,#06,#06,#05,#05
	db #04,#04,#03,#03,#02,#02,#03,#03
	db #08,#00,#00,#08,#00,#00,#00,#00
.la11b
	db #0f,#00,#08,#0e,#00,#08,#0d,#00
	db #08,#0e,#00,#08,#0f,#00,#08,#0e
	db #00,#08,#0d,#00,#08,#0e,#00,#08
	db #0f,#00,#08,#0e,#00,#08,#0d,#00
	db #08,#0e,#00,#08,#0f,#00,#08,#0e
	db #00,#08,#0d,#00,#08,#0e,#00,#08
.la14b
	db #00,#00,#23,#00,#00,#23,#23,#00
	db #00,#00,#00,#23,#23,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#23,#00,#00,#23,#23,#00
	db #00,#00,#00,#23,#23,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
.la17b
	db #03,#00,#00,#00,#00,#03,#00,#00
	db #00,#00,#00,#03,#03,#00,#0f,#00
	db #00,#00,#0a,#00,#00,#03,#00,#00
	db #03,#00,#00,#00,#00,#03,#00,#00
	db #00,#00,#00,#03,#03,#00,#0f,#00
	db #00,#00,#12,#00,#00,#16,#00,#00
.la1ab
	db #03,#00,#12,#00,#00,#0f,#12,#00
	db #00,#00,#00,#0f,#12,#00,#0f,#00
	db #00,#00,#0e,#00,#00,#0f,#00,#00
	db #03,#00,#12,#00,#00,#0f,#12,#00
	db #00,#00,#00,#0f,#12,#00,#0f,#00
	db #00,#00,#0e,#00,#00,#0f,#00,#00
.la1db
	db #48,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#48,#00,#00,#48
	db #00,#48,#00,#00,#26,#26,#26,#26
	db #48,#00,#00,#48,#00,#48,#00,#00
	db #00,#00,#00,#48,#2b,#00,#00,#2b
	db #00,#00,#2b,#00,#00,#2b,#00,#00
.la20b
	db #14,#00,#00,#13,#00,#00,#12,#00
	db #12,#11,#00,#11,#10,#00,#00,#0f
	db #00,#00,#0e,#00,#00,#0f,#00,#00
	db #14,#00,#00,#13,#00,#00,#12,#00
	db #12,#11,#00,#11,#10,#00,#00,#0f
	db #00,#00,#0e,#00,#00,#0f,#00,#00
.la23b
	db #14,#00,#00,#17,#00,#9b,#00,#00
	db #00,#00,#00,#1b,#1a,#00,#00,#17
	db #00,#16,#00,#00,#00,#00,#00,#14
	db #14,#00,#00,#17,#00,#1b,#1b,#00
	db #1c,#1e,#00,#00,#1c,#00,#00,#1b
	db #00,#00,#1a,#00,#00,#1b,#00,#00
.la26b
	db #17,#00,#00,#00,#00,#00,#16,#14
	db #16,#00,#00,#00,#0f,#00,#00,#00
	db #14,#00,#00,#00,#00,#00,#12,#10
	db #12,#00,#00,#00,#17,#00,#00,#00
	db #14,#00,#00,#00,#00,#00,#12,#10
	db #12,#00,#00,#00,#17,#00,#00,#00
	db #16,#00,#00,#00,#14,#00,#00,#00
	db #13,#00,#00,#00,#00,#00,#00,#00
.la2ab
	db #14,#17,#16,#17,#14,#17,#12,#17
	db #10,#17,#12,#17,#14,#17,#10,#17
	db #10,#16,#14,#16,#12,#16,#10,#16
	db #0f,#16,#10,#16,#12,#16,#0f,#16
	db #10,#14,#12,#14,#10,#14,#0f,#14
	db #0d,#14,#0f,#14,#10,#14,#0d,#14
	db #0f,#13,#11,#13,#0f,#13,#0f,#14
	db #0f,#16,#0f,#17,#0f,#19,#0f,#16
.la2eb
	db #48,#48,#48,#48,#48,#48,#48,#48
	db #26,#26,#26,#26,#26,#26,#26,#26
	db #4d,#4d,#4d,#4d,#4d,#4d,#4d,#4d
	db #2f,#2f,#2f,#2f,#2f,#2f,#2f,#2f
.la30b
	db #08,#00,#00,#0a,#0b,#00,#08,#00
	db #08,#00,#00,#00,#00,#00,#03,#00
	db #08,#00,#00,#0a,#0b,#00,#08,#00
	db #0f,#00,#00,#00,#00,#00,#0f,#00
	db #10,#00,#00,#00,#00,#00,#0f,#10
	db #0f,#00,#00,#00,#00,#00,#0f,#00
	db #0d,#00,#00,#00,#0d,#00,#00,#00
	db #0f,#00,#00,#00,#00,#00,#03,#00
.la34b
	db #05,#08,#0c,#0f,#0e,#00,#05,#05
	db #00,#08,#0c,#0f,#0e,#00,#05,#05
	db #05,#08,#0c,#0f,#0e,#00,#05,#05
	db #00,#08,#0c,#0f,#0e,#0c,#0c,#0a
	db #0c,#00,#0a,#08,#0a,#00,#08,#07
	db #08,#00,#03,#05,#00,#00,#00,#00
	db #00,#08,#08,#07,#08,#00,#00,#08
	db #07,#0a,#00,#00,#05,#00,#03,#00
.la38b
	db #23,#00,#00,#45,#00,#00,#23,#00
	db #00,#45,#00,#00,#23,#00,#45,#00
	db #23,#00,#00,#45,#00,#00,#23,#00
	db #00,#45,#00,#00,#23,#00,#45,#00
	db #28,#45,#23,#45,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#45,#45,#45
	db #28,#45,#23,#45,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#45,#45,#45
.la3cb
	db #11,#11,#10,#10,#0f,#0f,#10,#10
	db #11,#11,#10,#10,#0f,#0f,#10,#10
	db #11,#11,#10,#10,#0f,#0f,#10,#10
	db #11,#11,#10,#10,#0f,#0f,#10,#11
	db #0c,#0c,#0b,#0b,#0a,#0a,#0b,#0b
	db #0c,#0c,#0b,#0b,#0a,#0a,#0b,#0b
	db #0c,#0c,#0b,#0b,#0a,#0a,#0b,#0b
	db #0c,#0c,#0b,#0b,#0a,#0a,#0b,#0c
.la40b
	db #11,#11,#10,#10,#0f,#0f,#10,#10
	db #11,#11,#10,#10,#0f,#0f,#10,#10
	db #11,#11,#10,#10,#0f,#0f,#10,#10
	db #11,#11,#10,#10,#0f,#0f,#10,#11
	db #14,#11,#0f,#11,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#11,#11,#11
	db #13,#00,#00,#00,#14,#00,#00,#00
	db #16,#00,#00,#00,#18,#00,#00,#00
.la44b
	db #19,#00,#00,#00,#1b,#00,#00,#00
	db #1d,#00,#00,#00,#20,#00,#00,#00
	db #1d,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#20,#00
	db #1e,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#03,#00
.la48b
	db #07,#00,#00,#00,#00,#00,#00,#00
	db #05,#00,#00,#00,#00,#00,#05,#00
	db #0a,#00,#00,#00,#08,#00,#00,#00
	db #07,#00,#00,#00,#08,#00,#00,#00
.la4ac equ $ + 1
.la4ab
	db #05,#01,#00,#45,#45,#01,#00,#01
	db #01,#01,#00,#45,#45,#01,#00,#01
	db #01,#01,#00,#45,#45,#01,#00,#01
	db #01,#01,#00,#45,#45,#01,#00,#01
	db #00,#01,#00,#21,#21,#01,#00,#01
	db #01,#01,#00,#21,#21,#01,#00,#01
	db #01,#01,#00,#21,#21,#01,#00,#01
	db #01,#01,#00,#21,#21,#01,#00,#01
.la4ec equ $ + 1
	db #00,#05,#05,#07,#05,#08,#05,#0a
	db #05,#0c,#05,#0d,#05,#0c,#05,#08
	db #05,#05,#05,#07,#05,#08,#05,#0a
	db #05,#0c,#05,#0d,#05,#0c,#05,#08
	db #05,#01,#01,#03,#01,#05,#01,#07
	db #01,#08,#01,#0a,#01,#08,#01,#07
	db #05,#01,#01,#03,#01,#05,#01,#07
	db #01,#08,#01,#0a,#01,#08,#01,#07
.la52c equ $ + 1
	db #05,#05,#00,#00,#00,#00,#00,#05
	db #00,#07,#00,#00,#00,#00,#00,#07
	db #00,#08,#00,#00,#00,#00,#00,#08
	db #00,#0a,#00,#00,#00,#0c,#00,#00
	db #00,#07,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#0f,#00,#0f,#00,#0e
	db #00,#0d,#00,#00,#00,#00,#00,#11
	db #00,#13,#00,#00,#00,#14,#00,#00
	db #00,#11,#00,#00,#00,#00,#00,#10
	db #00,#0f,#00,#00,#00,#00,#00,#0e
	db #00,#0d,#00,#00,#00,#00,#00,#0c
	db #00,#0b,#00,#00,#00,#0c,#00,#00
	db #00,#07,#00,#00,#00,#00,#00,#00
	db #00,#05,#00,#00,#00,#00,#00,#05
	db #00,#0a,#00,#00,#00,#08,#00,#00
	db #00,#07,#00,#00,#00,#08,#00,#00
	db #00
.la5ac
	ld a,(la99a)
	and #07
	ld c,a
	ld hl,la5c8
	add hl,bc
	ld a,#38
	ld (lab36),a
	ld a,e
	ld (lab14),a
	ld a,(hl)
	and a
	ret z
	ld a,#31
	ld (lab36),a
	ret
.la5c8
	db #01,#00,#00,#00,#01,#00,#01,#01
.la5d0
	xor a
	ld (la5fd),a
	add hl,bc
	ld a,(hl)
	and a
	ret z
	push af
	and #f0
	ld (l9d20),a
	pop af
	and #0f
	jr la5f1
.la5e3
	xor a
	jr la5ec
.la5e6
	ld a,#19
	jr la5ec
.la5ea
	ld a,#32
.la5ec
	ld (la5fd),a
	add hl,bc
	ld a,(hl)
.la5f1
	ld (la679),a
	and #7f
	ret z
.la5f8 equ $ + 1
	add #00
	add e
	add #06
.la5fd equ $ + 1
	ld de,#0032
	ld hl,l9d12
	add hl,de
	add a
	add a
	ld e,a
	ld d,#00
	ld (hl),e
	inc hl
	ld (hl),d
	ld a,(la679)
	bit 7,a
	jr nz,la616
	inc hl
	ld (hl),e
	inc hl
	ld (hl),d
.la616
	ld hl,l9d1c
	ld de,(la5fd)
	add hl,de
	xor a
	ld (hl),a
	inc hl
	ld (hl),a
	ld hl,l9d24
	add hl,de
	ld a,#01
	ld (hl),a
	dec hl
	ld a,#ff
	ld (hl),a
	ret
.la62e
	ld (la679),sp
	ld bc,(la5fd)
	ld hl,l9d12
	add hl,bc
	ld sp,hl
	pop hl
	pop de
	and a
	sbc hl,de
	dec sp
	dec sp
	pop hl
	pop bc
	jr z,la64e
	jr c,la64b
	add hl,bc
	jr la64e
.la64b
	and a
	sbc hl,bc
.la64e
	ld (la671),hl
	pop de
	add hl,de
	ld de,#0030
	and a
	ld b,#00
.la659
	inc b
	sbc hl,de
	jr nc,la659
	add hl,de
	add hl,hl
	ld de,laa9b
	add hl,de
	ld e,(hl)
	inc hl
	ld d,(hl)
.la667
	srl d
	rr e
	djnz la667
	inc sp
	inc sp
	push de
.la671 equ $ + 1
	ld hl,#0000
	dec sp
	dec sp
	dec sp
	dec sp
	push hl
.la67a equ $ + 2
.la679 equ $ + 1
	ld sp,#00de
	ret
.la67c
	ld de,(la5fd)
	ld hl,l9d24
	add hl,de
	dec (hl)
	ret nz
	inc hl
	ld a,(hl)
	dec hl
	ld (hl),a
	dec hl
	ld a,#0f
	cp (hl)
	ret z
	inc (hl)
	ld e,(hl)
	ld d,#00
	ld b,#00
	dec hl
	ld c,(hl)
	push hl
	ld hl,la9d3
	add hl,bc
	add hl,de
	ld a,(hl)
	pop hl
	dec hl
	ld (hl),a
	ret
.la6a2
	ld hl,l9d1c
	ld bc,(la5fd)
	add hl,bc
	ld e,(hl)
	inc hl
	ld d,(hl)
	inc de
	ld (hl),d
	dec hl
	ld (hl),e
	ld bc,#0000
	inc hl
	inc hl
	ld a,(hl)
	and a
	push hl
	ld h,#00
	ld l,a
	sbc hl,de
	pop hl
	inc hl
	inc hl
	jr nc,la6d6
	push hl
	ld a,e
	and #0f
	or (hl)
	ld c,a
	ld hl,laa1b
	add hl,bc
	ld a,(hl)
	ld c,a
	and a
	pop hl
	jp p,la6d6
	ld b,#ff
.la6d6
	dec hl
	dec hl
	dec hl
	dec hl
	dec hl
	dec hl
	dec hl
	dec hl
	ld (hl),c
	inc hl
	ld (hl),b
	ret
.la6e2
	ld a,(la9ac)
	or a
	ret nz
	ld hl,l9d0e
	ld bc,(la5fd)
	add hl,bc
	inc (hl)
	inc hl
	jr nz,la6fb
	inc (hl)
	jr nz,la6fb
	inc hl
	ld a,(hl)
	inc hl
	jr la6ff
.la6fb
	inc hl
	inc hl
	ld a,(hl)
	ld (hl),b
.la6ff
	and a
	ret z
	ld c,a
	sla c
	sla c
	sla c
	sla c
	rl b
	dec hl
	dec hl
	dec hl
	ex de,hl
	ld hl,la79b
	add hl,bc
	ldi
	ldi
	ldi
	inc de
	ldi
	ldi
	ldi
	ldi
	ldi
	ldi
	inc de
	inc de
	inc de
	inc de
	inc de
	inc de
	ldi
	ldi
	ldi
	inc de
	ldi
	inc de
	inc de
	ldi
	ldi
	call la95b
	jp la616
.la742
	ld b,#00
	ld d,#00
	ld hl,l9d16
	add hl,de
	ld c,a
	ex de,hl
	ld hl,la78b
	add hl,bc
	ldi
	ldi
	inc de
	inc de
	inc de
	inc de
	inc de
	inc de
	ldi
	ldi
	ldi
	inc de
	ldi
	inc de
	inc de
	ldi
	ldi
	ret
.la76a
	ld (la679),bc
	ld e,#00
	call la742
	ld a,(la67a)
	ld e,#19
	call la742
	ld a,(la679)
	ld e,#32
	call la742
	ld a,(la9ac)
	inc a
	ld (l9d59),a
	ret
.la78b
	db #01,#00,#00,#00,#70,#20,#01,#01
	db #04,#00,#0a,#00,#50,#20,#05,#01
.la79b
	db #04,#00,#0a,#00,#50,#10,#05,#01
	db #01,#00,#00,#00,#70,#10,#01,#01
	db #ff,#ff,#00,#00,#00,#00,#00,#04
	db #00,#08,#00,#00,#00,#01,#00,#00
	db #f9,#ff,#01,#02,#00,#5a,#00,#15
	db #00,#01,#00,#50,#10,#02,#09,#00
	db #f9,#ff,#01,#83,#00,#1f,#00,#12
	db #00,#00,#00,#20,#10,#02,#09,#00
	db #f3,#ff,#01,#97,#00,#6f,#00,#08
	db #00,#00,#00,#40,#10,#02,#08,#00
	db #37,#ff,#01,#1e,#00,#02,#00,#04
	db #00,#08,#00,#00,#10,#03,#08,#00
	db #a5,#ff,#01,#1f,#00,#1f,#00,#00
	db #00,#10,#00,#00,#10,#03,#08,#00
	db #9c,#ff,#01,#fa,#00,#ff,#00,#34
	db #00,#00,#00,#30,#10,#01,#01,#00
	db #37,#ff,#01,#e0,#00,#18,#00,#16
	db #00,#00,#00,#20,#10,#0a,#01,#00
	db #9c,#ff,#01,#3a,#00,#0d,#00,#37
	db #00,#00,#00,#20,#20,#01,#01,#00
	db #fd,#ff,#01,#36,#00,#03,#00,#0c
	db #00,#00,#00,#00,#30,#01,#09,#00
	db #fc,#ff,#0e,#10,#00,#6e,#00,#08
	db #00,#00,#00,#00,#30,#01,#01,#00
	db #fe,#ff,#01,#77,#00,#dd,#00,#02
	db #00,#00,#00,#30,#10,#04,#01,#00
	db #f9,#ff,#01,#e5,#00,#79,#00,#08
	db #00,#00,#00,#30,#30,#01,#09,#00
	db #a7,#ff,#01,#36,#00,#03,#00,#04
	db #00,#00,#00,#70,#40,#01,#08,#00
	db #e6,#ff,#01,#1f,#00,#33,#00,#01
	db #00,#08,#00,#00,#30,#03,#01,#00
	db #fe,#ff,#10,#33,#00,#15,#00,#01
	db #00,#08,#00,#00,#30,#03,#08,#00
	db #00,#ff,#01,#1f,#00,#1f,#00,#00
	db #00,#10,#00,#58,#10,#0d,#08,#00
	db #00,#ff,#01,#fe,#00,#90,#00,#01
	db #00,#10,#00,#80,#20,#03,#01,#00
	db #d5,#ff,#01,#64,#00,#dd,#00,#03
	db #00,#08,#00,#50,#30,#03,#01,#00
	db #bd,#ff,#01,#dd,#00,#79,#00,#03
	db #00,#08,#00,#50,#30,#01,#08,#00
	db #a7,#ff,#01,#df,#00,#a2,#00,#00
	db #00,#04,#00,#20,#20,#02,#01,#00
	db #fe,#ff,#01,#01,#00,#01,#00,#00
	db #00,#00,#00,#00,#10,#04,#08,#00
	db #d2,#ff,#01,#de,#00,#a1,#00,#01
	db #00,#00,#00,#20,#20,#04,#01,#00
	db #00,#ff,#01,#36,#00,#04,#00,#e4
	db #00,#10,#00,#50,#20,#01,#01,#00
	db #fb,#ff,#01,#03,#00,#33,#00,#df
	db #00,#08,#00,#50,#30,#01,#09,#00
	db #e9,#ff,#01,#21,#00,#01,#00,#df
	db #00,#00,#00,#20,#10,#01,#09,#00
	db #ff,#ff,#01,#ff,#00,#ff,#00,#00
	db #00,#08,#00,#50,#30,#01,#01,#00
.la95b
	ld a,(l9d26)
	xor #39
	ld (lab36),a
	ld a,(l9d14)
	ld (lab14),a
	ret
.la96a
	xor a
	ld (l9d0d),a
	ld (l9d59),a
.la971
	xor a
	ld (l9d21),a
	ld (l9d3a),a
	ld (l9d53),a
	ld (l9d10),a
	ld (l9d29),a
	ld (l9d42),a
	ld (l9d11),a
	ld (l9d2a),a
	ld (l9d43),a
	ld a,#0f
	ld (l9d23),a
	ld (l9d3c),a
	ld (l9d55),a
.la998
	ret
.la99b equ $ + 2
.la99a equ $ + 1
.la999
	ld bc,#0000
.la99d equ $ + 1
	ld a,#00
	inc a
	cp e
	jp nz,la9a5
	ld a,#00
.la9a5
	ld (la99d),a
	ret z
	pop bc
	ret
.la9ac equ $ + 1
.la9ab
	ld bc,#0001
	ld hl,l9e33
	add hl,bc
	ld c,(hl)
	ld hl,(la99a)
	inc hl
	ld (la99a),hl
	and a
	sbc hl,bc
	ret z
	pop bc
	ret
.la9c0
	call la9ab
	ld a,(la9ac)
	inc a
	ld (l9d59),a
	ret
.la9cb
	call la9ab
	ld a,e
	ld (l9d59),a
	ret
.la9d3
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #0f,#0d,#0c,#0b,#0a,#09,#08,#07
	db #06,#05,#04,#03,#02,#01,#00,#00
	db #0d,#0a,#0b,#0a,#09,#08,#07,#07
	db #06,#06,#05,#04,#03,#02,#01,#00
	db #06,#06,#08,#0a,#0c,#0e,#0f,#0f
	db #0f,#0c,#09,#06,#03,#00,#00,#00
	db #0f,#0d,#0b,#09,#07,#05,#03,#01
.laa1b
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #14,#00,#14,#1c,#00,#14,#1c,#00
	db #14,#1c,#00,#14,#1c,#00,#14,#1c
	db #10,#00,#10,#1c,#00,#10,#1c,#00
	db #10,#1c,#00,#10,#1c,#00,#10,#1c
	db #08,#00,#08,#1c,#00,#08,#1c,#00
	db #08,#1c,#00,#08,#1c,#00,#08,#1c
	db #0c,#00,#0c,#1c,#00,#0c,#1c,#00
	db #0c,#1c,#00,#0c,#1c,#00,#0c,#1c
	db #01,#02,#01,#00,#ff,#fe,#ff,#00
	db #01,#02,#01,#00,#ff,#fe,#ff,#00
	db #0c,#00,#0c,#18,#00,#0c,#18,#00
	db #0c,#18,#00,#0c,#18,#00,#0c,#18
	db #01,#00,#30,#00,#01,#00,#30,#00
	db #01,#00,#30,#00,#01,#00,#30,#00
.laa9b
	db #00,#10,#c5,#0f,#8b,#0f,#52,#0f
	db #1a,#0f,#e3,#0e,#ac,#0e,#76,#0e
	db #41,#0e,#0d,#0e,#d9,#0d,#a6,#0d
	db #74,#0d,#43,#0d,#12,#0d,#e2,#0c
	db #b3,#0c,#84,#0c,#56,#0c,#29,#0c
	db #fd,#0b,#d1,#0b,#a5,#0b,#7a,#0b
	db #50,#0b,#27,#0b,#fe,#0a,#d6,#0a
	db #ae,#0a,#87,#0a,#60,#0a,#3a,#0a
	db #14,#0a,#ef,#09,#cb,#09,#a7,#09
	db #83,#09,#61,#09,#3e,#09,#1c,#09
	db #fb,#08,#da,#08,#b9,#08,#99,#08
	db #7a,#08,#5b,#08,#3c,#08,#1e
	ex af,af'
.laafb
	ld hl,(l9d1a)
	ld a,#00
	call lab3f
	ld hl,(l9d33)
	ld a,#02
	call lab3f
	ld hl,(l9d4c)
	ld a,#04
	call lab3f
.lab14 equ $ + 1
	ld c,#00
	ld a,#06
	call lab47
	ld a,(l9d21)
	ld c,a
	ld a,#08
	call lab47
	ld a,(l9d3a)
	ld c,a
	ld a,#09
	call lab47
	ld a,(l9d53)
	ld c,a
	ld a,#0a
	call lab47
.lab36 equ $ + 1
	ld a,#38
	and #3f
	ld c,a
	ld a,#07
	jp lab47
.lab3f
	ld c,l
	ld e,a
	call lab47
	ld a,e
	inc a
	ld c,h
.lab47
	push bc
	ld b,#f4
	out (c),a
	ld b,#f6
	in a,(c)
	or #c0
	out (c),a
	and #3f
	out (c),a
	ld b,#f4
	out (c),c
	ld b,#f6
	ld c,a
	or #80
	out (c),a
	out (c),c
	pop bc
	ret
;
.game_name
	db "Batman - The Caped Crusader",0
.game_year
	db "1988",0
.game_publisher
	db "Ocean Software",0
.music_author
	db "",0
.music_comment
	db "",0

	read "music_end_v1_0.asm"
